using System;
using Cysharp.Threading.Tasks;
using FrameWork;
using FrameWork.Util;
using Game.Controller;
using UnityEngine;

namespace Game
{
    public class GameLauncher : MonoBehaviour
    {
        public GameManager GameManager { get; private set; }

        private void Start()
        {
            LaunchGame();
        }

        // ReSharper disable once AsyncVoidMethod
        private async void LaunchGame()
        {
            GameManager = new GameObject("GameManager").AddComponent<GameManager>();
            await GameManager.InitGame();
            await LaunchController.Instance.ASyncLaunchGame();
        }
    }
}
